from django.shortcuts import render

# Create your views here.
from rest_framework.viewsets import ModelViewSet
from itops.models import UserInfo
from itops.serializer import UserInfoSerializer
from itops.filter import UserInfoFilter
from django_filters.rest_framework import DjangoFilterBackend


class UserInfoViewSet(ModelViewSet):
    queryset = UserInfo.objects.all()
    serializer_class = UserInfoSerializer

    filter_class = UserInfoFilter
    filter_fields = ['username']
    search_fields = ('username',)

